USE [Training]
GO

IF NOT EXISTS (SELECT * from dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.training_api_PositionSelect'))
	EXEC('CREATE PROC dbo.training_api_PositionSelect AS')
GO

ALTER PROC dbo.training_api_PositionSelect
	@PositionID	int = null
AS
	SELECT
		PositionID,
		Title
	FROM Position
	WHERE
		(@PositionID IS NULL OR(PositionID = @PositionID))
